﻿using System.Diagnostics;

namespace EIS.Obj
{
    public static class Error
    {
        public static void WriteEventLog(string text, string exceptionTrace)
        {
            const string log = "EIS";


            const string source = "EIS Quick Actioner";

            string eventText = text + "\n \n \n" + exceptionTrace;
            if (!EventLog.SourceExists(source))
                EventLog.CreateEventSource(source, log);

            EventLog.WriteEntry(source, eventText, EventLogEntryType.Error);
        }
    }
}